﻿
@{
    ViewData["Title"] = "Test";
}

@model IEnumerable<Employee>

@foreach (var item in Model)
{
    <employee for-id="@item.Id" for-name="@item.EmployeeName">

        @foreach (var department in item.Departments)
        {
            <department for-departmentName="@department.Name"></department>

            <!--传递对象:-->
            @*<department depmodel="@department"></department>*@
        }

    </employee>
}


<view-context></view-context>